<%--
  Created by IntelliJ IDEA.
  User: ？
  Date: 2021/11/8
  Time: 8:34
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>

    <script src="js/jquery-3.6.0.min.js"></script>

    <script>
        function  btn() {

            //1 url
            let  url = "${pageContext.request.contextPath}/helloServlet"
            //2 参数 params
            let  params= {
                "method": "show01"
            }
            //3 回调函数

            let callback = function (rel) {
                alert("前端接收到的数据是: "+rel )

            }
            //4 发射

            $.post(url,params,callback)

        }



    </script>


</head>
<body>

<input type="button" value="发射"  onclick="btn()">






























</body>
</html>
